/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kmcsoft.goldshop.currency;

import com.kmcsoft.core.service.GenericService;
import com.kmcsoft.core.ui.GenericController;
import com.kmcsoft.goldshop.model.master.Currency;
import com.kmcsoft.zkex.PagingListModel;

/**
 *
 * @author kmcsoft02
 */
public class CurrencyComposer extends GenericController<Currency, GenericService> {

    public void onCreate() {
        super.setSelected(service.getObject(Currency.class,"id==pId","Long pId", (Long)((Currency)getListModel().getElementAt(0)).getId()));
        getBinder().loadComponent(leftList);
    }
    @Override
    public PagingListModel<Currency> getListModel() {
        PagingListModel<Currency> listModel = super.getListModel();
        listModel.setOrdering("using descending");
        listModel.initialize();
        return listModel;
    }
    
}
